package remixlab.remixvym;

import processing.core.*;


/** 
 * Processing Sketch code for testing purposes
 * */

public class ProccesingFrame extends PApplet {

	private static final long serialVersionUID = 1L;
	
	/*@
	 * 
	 * */
	public void setup() {
		
//		map = new MindMap();
//		PXMLReader xml = new PXMLReader(this);
		//map.create("resources/1.xml", xml);
//		map.create("resources/PruebaEmoticons2.xml", xml);
//		map.create("resources/PruebaImagen.xml", xml);
//		map.create("resources/7.xml", xml);
//		map.create("resources/PruebaVideo2.xml", xml);
//		map.create("resources/PruebaImagen.xml", xml);
//		map.create("resources/prueba1.xml", xml);
//		map.create("resources/contenidos_libres.xml", xml);
//		map.create("resources/video.xml", xml);
//		map.create("resources/contenidos_libres.xml", xml);
//		map.create("resources/video.xml", xml);
//		map.create("../examples/Colors/Example-colors-style.xml", xml);
		
		//graph = new NormalMindMap(this);
		
//		lecture of xml of nodes
		//XMLElement nodeXml;
		//nodeXml = new XMLElement(this,"resources/lineNodes.xml");
		
		//NodeStyleGraph style = new NodeStyleGraph();
		//style.init(nodeXml);
		//graph = new SceneMindMap(this,1,style); //2 Scale
		//graph = new SceneMindMap(this,1);
//		graph = new SceneMindMap(this,800,600); //DEFAULT P2D
		

//		size(1000, 700);
//		graph = new SceneMindMap(this); // DEFAULT WITHOUT SIZE 
//		graph.setMap(map);
		
		
//		StyleGraph style = new StyleGraph();
//		
//		style.initDeafult(this);
//		
//		style.addNodeStyle(new RectNode());
//		style.addNodeStyle(new OvalNode());
//		style.addNodeStyle(new NoneNode());
//		
//		
//		style.addLinkStyle(new TriangleLink(1));
//		style.addLinkStyle(new OvalLink());
//		style.addLinkStyle(new LineLink());
		
		//graph = new SceneMindMap(this,800,600); //DEFAULT P2D
		
		//graph.setScaleMode(2);
//		style.setSelectedColor(255, 255, 0);
//		style.setBackgroundColor(153, 220, 153);
//		style.setHighlightColor(255, 0, 0);
//		style.setNonSelectedColor(250, 250, 200);
//		style.setPressedColor(0, 0, 200);
//		graph.getStyleMap().setVymWindows(this);
		
		//Create the scene that contains the mind map and set it from a XML file. 
		graph = new SceneMindMap(this,800,600);
		graph.setMap("contenidos_libres.xml");
//		

	}
	/*
	public void movieEvent(GSMovie myMovie) {
		myMovie.read();
	}
	*/
	public void draw() {
		graph.paint();
	}
	
	SceneMindMap graph;
}
